Skip to content

[ENQUEUE] Precise phpdoc for static analysis #1306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2023
Merged

[ENQUEUE] Precise phpdoc for static analysis #1306

merged 1 commit into from
Oct 14, 2023

Conversation

VincentLanglet
Copy link
Contributor

HI @makasim,

The CommandSubscriberInterface::getSubscribedCommand is currently annotated with string|array return type.
Static analysis tool allows to provide a more precise return type.
This PR allow PHPStan and Psalm users to have to proper static analysis of the return type when implementing the interface.

I based the array type on the current phpdoc, talking about

     * [
     *   'command' => 'aSubscribedCommand',
     *   'processor' => 'aProcessorName',
     *   'queue' => 'a_client_queue_name',
     *   'prefix_queue' => true,
     *   'exclusive' => true,
     * ]

@VincentLanglet
Copy link
Contributor Author

Friendly ping @makasim

@makasim makasim merged commit 409dcb5 into php-enqueue:master Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants